package com.wang.loanassembly.controller;


import com.ddc.api.param.repay.RepayParam;
import com.ddc.api.param.repay.RepayRecordParam;
import com.wang.commons.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lichacha
 * @since 2022-01-04
 */
@Controller
@Api(tags = "还款的接口类")
public class LoanRepayMethodController {
    //查询还款记录,根据用户的身份证号码和贷款id来确认唯一一条的贷款还款的记录
    @ApiOperation("查询还款记录的接口")
    @PostMapping("repayRecord")
    public Result repayRecord(@RequestBody RepayRecordParam rrp){
        return null;
    }

    //正常还款
    //根据当前系统时间，用户的身份证号码、贷款id查询出某一笔的待还的金额
    //返回用户的还款金额
    @PostMapping("nomalRepay")
    @ApiOperation("正常还款接口")
    public Result nomalRepay(@RequestBody RepayParam rp ){
        return null;
    }


    //延迟还款
    //根据当前时间计算延迟还款的滞纳金，采取相关的处理方式
    //根据用户传入的身份证号码，查询出没有完成还款的贷款，根据贷款id查询贷款计划
    @ApiOperation("延迟还款接口")
    @GetMapping("deleay/{userName}")
    public Result deleayRepay( @ApiParam(value = "用户名称",name = "userName",required = true)@PathVariable("userName") Integer userName){
        return null;
    }

}

